import socket

HOST = '127.0.0.1'
PORT = 3434


s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
data = 'hello udp server'
s.sendto(data.encode('utf-8'),(HOST,PORT))
print('sent %s to %s:%d '%(data,HOST,PORT))

s.close()